﻿


  
using System;
using SubSonic;
using SubSonic.Schema;
using SubSonic.DataProviders;
using System.Data;

namespace ModelDinhMuc.Model{
	public partial class DINHMUCSANBAYDB{

        public StoredProcedure checklogin(string userid,string password){
            StoredProcedure sp=new StoredProcedure("checklogin",this.Provider);
            sp.Command.AddParameter("userid",userid,DbType.String);
            sp.Command.AddParameter("password",password,DbType.String);
            return sp;
        }
        public StoredProcedure DeleteChiTietDungCu(long iddungcu,long idphieudungcu){
            StoredProcedure sp=new StoredProcedure("DeleteChiTietDungCu",this.Provider);
            sp.Command.AddParameter("iddungcu",iddungcu,DbType.Int64);
            sp.Command.AddParameter("idphieudungcu",idphieudungcu,DbType.Int64);
            return sp;
        }
        public StoredProcedure DeleteChuyenBay(long id){
            StoredProcedure sp=new StoredProcedure("DeleteChuyenBay",this.Provider);
            sp.Command.AddParameter("id",id,DbType.Int64);
            return sp;
        }
        public StoredProcedure DeleteDungCu(long id){
            StoredProcedure sp=new StoredProcedure("DeleteDungCu",this.Provider);
            sp.Command.AddParameter("id",id,DbType.Int64);
            return sp;
        }
        public StoredProcedure DeleteDungCuPhucVuChuyenBay(long id){
            StoredProcedure sp=new StoredProcedure("DeleteDungCuPhucVuChuyenBay",this.Provider);
            sp.Command.AddParameter("id",id,DbType.Int64);
            return sp;
        }
        public StoredProcedure getslphicongtiepvienByMaMBAndMaChuyenBay(string mamb,string machuyenbay){
            StoredProcedure sp=new StoredProcedure("getslphicongtiepvienByMaMBAndMaChuyenBay",this.Provider);
            sp.Command.AddParameter("mamb",mamb,DbType.String);
            sp.Command.AddParameter("machuyenbay",machuyenbay,DbType.String);
            return sp;
        }
        public StoredProcedure InsertUpateChuyenBay(string mamb,string maChuyenBay,int sophicong,int sotiepvien){
            StoredProcedure sp=new StoredProcedure("InsertUpateChuyenBay",this.Provider);
            sp.Command.AddParameter("mamb",mamb,DbType.String);
            sp.Command.AddParameter("maChuyenBay",maChuyenBay,DbType.String);
            sp.Command.AddParameter("sophicong",sophicong,DbType.Int32);
            sp.Command.AddParameter("sotiepvien",sotiepvien,DbType.Int32);
            return sp;
        }
        public StoredProcedure InsertUpdateCatalog(long id,long parentid,string macatalog,string TenCatalog){
            StoredProcedure sp=new StoredProcedure("InsertUpdateCatalog",this.Provider);
            sp.Command.AddParameter("id",id,DbType.Int64);
            sp.Command.AddParameter("parentid",parentid,DbType.Int64);
            sp.Command.AddParameter("macatalog",macatalog,DbType.String);
            sp.Command.AddParameter("TenCatalog",TenCatalog,DbType.String);
            return sp;
        }
        public StoredProcedure InsertUpdateChiTietPhieuDungCu(long idphieudungcu,long iddungcu,double slcapchokhachvip,double slcapchokhachthuong,double slcapchophicong,double slcapchotiepvien,bool codinh){
            StoredProcedure sp=new StoredProcedure("InsertUpdateChiTietPhieuDungCu",this.Provider);
            sp.Command.AddParameter("idphieudungcu",idphieudungcu,DbType.Int64);
            sp.Command.AddParameter("iddungcu",iddungcu,DbType.Int64);
            sp.Command.AddParameter("slcapchokhachvip",slcapchokhachvip,DbType.Double);
            sp.Command.AddParameter("slcapchokhachthuong",slcapchokhachthuong,DbType.Double);
            sp.Command.AddParameter("slcapchophicong",slcapchophicong,DbType.Double);
            sp.Command.AddParameter("slcapchotiepvien",slcapchotiepvien,DbType.Double);
            sp.Command.AddParameter("codinh",codinh,DbType.Boolean);
            return sp;
        }
        public StoredProcedure InsertUpdateDungCu(long id,long idcatalog,string madungcu,string tendungcu,string donvi){
            StoredProcedure sp=new StoredProcedure("InsertUpdateDungCu",this.Provider);
            sp.Command.AddParameter("id",id,DbType.Int64);
            sp.Command.AddParameter("idcatalog",idcatalog,DbType.Int64);
            sp.Command.AddParameter("madungcu",madungcu,DbType.String);
            sp.Command.AddParameter("tendungcu",tendungcu,DbType.String);
            sp.Command.AddParameter("donvi",donvi,DbType.String);
            return sp;
        }
        public StoredProcedure InsertUpdateDungCuPhucvuChuyenBay(long id,string tenphieudungcu,long idchuyenbay,long idcatalog){
            StoredProcedure sp=new StoredProcedure("InsertUpdateDungCuPhucvuChuyenBay",this.Provider);
            sp.Command.AddParameter("id",id,DbType.Int64);
            sp.Command.AddParameter("tenphieudungcu",tenphieudungcu,DbType.String);
            sp.Command.AddParameter("idchuyenbay",idchuyenbay,DbType.Int64);
            sp.Command.AddParameter("idcatalog",idcatalog,DbType.Int64);
            return sp;
        }
        public StoredProcedure SelectALLChitietDungCu(){
            StoredProcedure sp=new StoredProcedure("SelectALLChitietDungCu",this.Provider);
            return sp;
        }
        public StoredProcedure SelectALLChitietDungCuByPhieuDungCu(long idphieudungcu){
            StoredProcedure sp=new StoredProcedure("SelectALLChitietDungCuByPhieuDungCu",this.Provider);
            sp.Command.AddParameter("idphieudungcu",idphieudungcu,DbType.Int64);
            return sp;
        }
        public StoredProcedure SelectAllChuyenBay(){
            StoredProcedure sp=new StoredProcedure("SelectAllChuyenBay",this.Provider);
            return sp;
        }
        public StoredProcedure SelectAllDungCu(){
            StoredProcedure sp=new StoredProcedure("SelectAllDungCu",this.Provider);
            return sp;
        }
        public StoredProcedure SelectAllDungCuPhucVuChuyenBay(){
            StoredProcedure sp=new StoredProcedure("SelectAllDungCuPhucVuChuyenBay",this.Provider);
            return sp;
        }
        public StoredProcedure selectcatalogHaveParent(long parentid){
            StoredProcedure sp=new StoredProcedure("selectcatalogHaveParent",this.Provider);
            sp.Command.AddParameter("parentid",parentid,DbType.Int64);
            return sp;
        }
        public StoredProcedure selectcatalogParent(){
            StoredProcedure sp=new StoredProcedure("selectcatalogParent",this.Provider);
            return sp;
        }
        public StoredProcedure SelectChiTietDungCuByMaMBAndMaChuyenBay(string mamb,string mabay,long idcatalog){
            StoredProcedure sp=new StoredProcedure("SelectChiTietDungCuByMaMBAndMaChuyenBay",this.Provider);
            sp.Command.AddParameter("mamb",mamb,DbType.String);
            sp.Command.AddParameter("mabay",mabay,DbType.String);
            sp.Command.AddParameter("idcatalog",idcatalog,DbType.Int64);
            return sp;
        }
	
	}
	
}
 